import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'


export default defineConfig({
  plugins: [vue()],
  server: {
    port: 8080,
    proxy: {
      '/api': {
        //  target: 'http://47.237.77.65/creator-platform/back',
        //  target: 'http://185.242.232.78/creator-platform/back',
        // target: 'http://192.168.1.117:8080',
        target: 'http://185.242.232.78/creator-platform/back',
        changeOrigin: true,
        rewrite: (path) => path.replace(/^\/api/, '')
      },
      '/wkfapi': {
        target: 'https://pixeljet-n8n.com',
        changeOrigin: true,
        rewrite: (path) => path.replace(/^\/wkfapi/, '')
      },
    }
  },
  base: '/article'
})
